package com.tywj.panda.customer.common.view.dialog

import android.os.Bundle
import android.view.Gravity
import com.tywj.panda.customer.common.R
import com.tywj.panda.customer.common.view.base.MyBaseDialog


/**
 * @desc 封装底部弹窗框架
 * @author June Yang
 * @date 2020/5/27
 */
abstract class BottomDialog : MyBaseDialog() {

    override fun initVariable(savedInstanceState: Bundle?) {
        super.initVariable(savedInstanceState)

        val params = dialog?.window?.attributes
        params?.windowAnimations = getAnimationStyle()
        dialog?.window?.attributes = params
    }

    override fun getGravity(): Int = Gravity.BOTTOM

    override fun getAnimationStyle(): Int = R.style.BottomDialogAnimation
}